Optimal. Leaf size=252 \[ \frac {\left (-3 a^2 C+15 a b B+16 b^2 C\right ) \tan (c+d x) (a+b \sec (c+d x))^2}{60 b d}+\frac {\left (4 a^3 C+12 a^2 b B+9 a b^2 C+3 b^3 B\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {\left (-6 a^3 C+30 a^2 b B+71 a b^2 C+45 b^3 B\right ) \tan (c+d x) \sec (c+d x)}{120 d}+\frac {\left (-3 a^4 C+15 a^3 b B+52 a^2 b^2 C+60 a b^3 B+16 b^4 C\right ) \tan (c+d x)}{30 b d}+\frac {(5 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^3}{20 b d}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^4}{5 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.50, antiderivative size = 252, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {4072, 4010, 4002, 3997, 3787, 3770, 3767, 8} \[ \frac {\left (52 a^2 b^2 C+15 a^3 b B-3 a^4 C+60 a b^3 B+16 b^4 C\right ) \tan (c+d x)}{30 b d}+\frac {\left (12 a^2 b B+4 a^3 C+9 a b^2 C+3 b^3 B\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {\left (-3 a^2 C+15 a b B+16 b^2 C\right ) \tan (c+d x) (a+b \sec (c+d x))^2}{60 b d}+\frac {\left (30 a^2 b B-6 a^3 C+71 a b^2 C+45 b^3 B\right ) \tan (c+d x) \sec (c+d x)}{120 d}+\frac {(5 b B-a C) \tan (c+d x) (a+b \sec (c+d x))^3}{20 b d}+\frac {C \tan (c+d x) (a+b \sec (c+d x))^4}{5 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3767
Rule 3770
Rule 3787
Rule 3997
Rule 4002
Rule 4010
Rule 4072
Rubi steps
\begin {align*} \int \sec (c+d x) (a+b \sec (c+d x))^3 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \sec ^2(c+d x) (a+b \sec (c+d x))^3 (B+C \sec (c+d x)) \, dx\\ &=\frac {C (a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x))^3 (4 b C+(5 b B-a C) \sec (c+d x)) \, dx}{5 b}\\ &=\frac {(5 b B-a C) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {C (a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x))^2 \left (b (15 b B+13 a C)+\left (15 a b B-3 a^2 C+16 b^2 C\right ) \sec (c+d x)\right ) \, dx}{20 b}\\ &=\frac {\left (15 a b B-3 a^2 C+16 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}+\frac {(5 b B-a C) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {C (a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {\int \sec (c+d x) (a+b \sec (c+d x)) \left (b \left (75 a b B+33 a^2 C+32 b^2 C\right )+\left (30 a^2 b B+45 b^3 B-6 a^3 C+71 a b^2 C\right ) \sec (c+d x)\right ) \, dx}{60 b}\\ &=\frac {\left (30 a^2 b B+45 b^3 B-6 a^3 C+71 a b^2 C\right ) \sec (c+d x) \tan (c+d x)}{120 d}+\frac {\left (15 a b B-3 a^2 C+16 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}+\frac {(5 b B-a C) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {C (a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {\int \sec (c+d x) \left (15 b \left (12 a^2 b B+3 b^3 B+4 a^3 C+9 a b^2 C\right )+4 \left (15 a^3 b B+60 a b^3 B-3 a^4 C+52 a^2 b^2 C+16 b^4 C\right ) \sec (c+d x)\right ) \, dx}{120 b}\\ &=\frac {\left (30 a^2 b B+45 b^3 B-6 a^3 C+71 a b^2 C\right ) \sec (c+d x) \tan (c+d x)}{120 d}+\frac {\left (15 a b B-3 a^2 C+16 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}+\frac {(5 b B-a C) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {C (a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}+\frac {1}{8} \left (12 a^2 b B+3 b^3 B+4 a^3 C+9 a b^2 C\right ) \int \sec (c+d x) \, dx+\frac {\left (15 a^3 b B+60 a b^3 B-3 a^4 C+52 a^2 b^2 C+16 b^4 C\right ) \int \sec ^2(c+d x) \, dx}{30 b}\\ &=\frac {\left (12 a^2 b B+3 b^3 B+4 a^3 C+9 a b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {\left (30 a^2 b B+45 b^3 B-6 a^3 C+71 a b^2 C\right ) \sec (c+d x) \tan (c+d x)}{120 d}+\frac {\left (15 a b B-3 a^2 C+16 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}+\frac {(5 b B-a C) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {C (a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}-\frac {\left (15 a^3 b B+60 a b^3 B-3 a^4 C+52 a^2 b^2 C+16 b^4 C\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{30 b d}\\ &=\frac {\left (12 a^2 b B+3 b^3 B+4 a^3 C+9 a b^2 C\right ) \tanh ^{-1}(\sin (c+d x))}{8 d}+\frac {\left (15 a^3 b B+60 a b^3 B-3 a^4 C+52 a^2 b^2 C+16 b^4 C\right ) \tan (c+d x)}{30 b d}+\frac {\left (30 a^2 b B+45 b^3 B-6 a^3 C+71 a b^2 C\right ) \sec (c+d x) \tan (c+d x)}{120 d}+\frac {\left (15 a b B-3 a^2 C+16 b^2 C\right ) (a+b \sec (c+d x))^2 \tan (c+d x)}{60 b d}+\frac {(5 b B-a C) (a+b \sec (c+d x))^3 \tan (c+d x)}{20 b d}+\frac {C (a+b \sec (c+d x))^4 \tan (c+d x)}{5 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 6.15, size = 211, normalized size = 0.84 \[ \frac {a^3 B \tan (c+d x)}{d}+\frac {a^2 (a C+3 b B) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {a^2 (a C+3 b B) \tan (c+d x) \sec (c+d x)}{2 d}+\frac {b^2 (3 a C+b B) \tan (c+d x) \sec ^3(c+d x)}{4 d}+\frac {3 b^2 (3 a C+b B) \left (\tanh ^{-1}(\sin (c+d x))+\tan (c+d x) \sec (c+d x)\right )}{8 d}+\frac {a b (a C+b B) \left (\tan ^3(c+d x)+3 \tan (c+d x)\right )}{d}+\frac {b^3 C \left (3 \tan ^5(c+d x)+10 \tan ^3(c+d x)+15 \tan (c+d x)\right )}{15 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.76, size = 249, normalized size = 0.99 \[ \frac {15 \, {\left (4 \, C a^{3} + 12 \, B a^{2} b + 9 \, C a b^{2} + 3 \, B b^{3}\right )} \cos \left (d x + c\right )^{5} \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, {\left (4 \, C a^{3} + 12 \, B a^{2} b + 9 \, C a b^{2} + 3 \, B b^{3}\right )} \cos \left (d x + c\right )^{5} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (8 \, {\left (15 \, B a^{3} + 30 \, C a^{2} b + 30 \, B a b^{2} + 8 \, C b^{3}\right )} \cos \left (d x + c\right )^{4} + 24 \, C b^{3} + 15 \, {\left (4 \, C a^{3} + 12 \, B a^{2} b + 9 \, C a b^{2} + 3 \, B b^{3}\right )} \cos \left (d x + c\right )^{3} + 8 \, {\left (15 \, C a^{2} b + 15 \, B a b^{2} + 4 \, C b^{3}\right )} \cos \left (d x + c\right )^{2} + 30 \, {\left (3 \, C a b^{2} + B b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.36, size = 722, normalized size = 2.87 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 2.04, size = 382, normalized size = 1.52 \[ \frac {a^{3} B \tan \left (d x +c \right )}{d}+\frac {C \,a^{3} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {C \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {3 a^{2} b B \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {3 a^{2} b B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2 d}+\frac {2 C \,a^{2} b \tan \left (d x +c \right )}{d}+\frac {C \,a^{2} b \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{d}+\frac {2 B a \,b^{2} \tan \left (d x +c \right )}{d}+\frac {B a \,b^{2} \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{d}+\frac {3 C a \,b^{2} \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{4 d}+\frac {9 C a \,b^{2} \sec \left (d x +c \right ) \tan \left (d x +c \right )}{8 d}+\frac {9 C a \,b^{2} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d}+\frac {b^{3} B \tan \left (d x +c \right ) \left (\sec ^{3}\left (d x +c \right )\right )}{4 d}+\frac {3 b^{3} B \sec \left (d x +c \right ) \tan \left (d x +c \right )}{8 d}+\frac {3 b^{3} B \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8 d}+\frac {8 b^{3} C \tan \left (d x +c \right )}{15 d}+\frac {b^{3} C \tan \left (d x +c \right ) \left (\sec ^{4}\left (d x +c \right )\right )}{5 d}+\frac {4 b^{3} C \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{15 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.33, size = 341, normalized size = 1.35 \[ \frac {240 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} C a^{2} b + 240 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a b^{2} + 16 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} C b^{3} - 45 \, C a b^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 15 \, B b^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 60 \, C a^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 180 \, B a^{2} b {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 240 \, B a^{3} \tan \left (d x + c\right )}{240 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.73, size = 470, normalized size = 1.87 \[ \frac {\mathrm {atanh}\left (\frac {4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {C\,a^3}{2}+\frac {3\,B\,a^2\,b}{2}+\frac {9\,C\,a\,b^2}{8}+\frac {3\,B\,b^3}{8}\right )}{2\,C\,a^3+6\,B\,a^2\,b+\frac {9\,C\,a\,b^2}{2}+\frac {3\,B\,b^3}{2}}\right )\,\left (C\,a^3+3\,B\,a^2\,b+\frac {9\,C\,a\,b^2}{4}+\frac {3\,B\,b^3}{4}\right )}{d}-\frac {\left (2\,B\,a^3-\frac {5\,B\,b^3}{4}-C\,a^3+2\,C\,b^3+6\,B\,a\,b^2-3\,B\,a^2\,b-\frac {15\,C\,a\,b^2}{4}+6\,C\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (\frac {B\,b^3}{2}-8\,B\,a^3+2\,C\,a^3-\frac {8\,C\,b^3}{3}-16\,B\,a\,b^2+6\,B\,a^2\,b+\frac {3\,C\,a\,b^2}{2}-16\,C\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (12\,B\,a^3+20\,C\,a^2\,b+20\,B\,a\,b^2+\frac {116\,C\,b^3}{15}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-8\,B\,a^3-\frac {B\,b^3}{2}-2\,C\,a^3-\frac {8\,C\,b^3}{3}-16\,B\,a\,b^2-6\,B\,a^2\,b-\frac {3\,C\,a\,b^2}{2}-16\,C\,a^2\,b\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,B\,a^3+\frac {5\,B\,b^3}{4}+C\,a^3+2\,C\,b^3+6\,B\,a\,b^2+3\,B\,a^2\,b+\frac {15\,C\,a\,b^2}{4}+6\,C\,a^2\,b\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (B + C \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{3} \sec ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________